<?php

class EmptyAction extends Action {

	public function index() {
		if (strtolower(GROUP_NAME) == "home") {
			if(intval(MODULE_NAME) > 0){
				$this->school = get_shcool_info(MODULE_NAME);
				redirect(C("SITE_URL")."/".$this->school["school_abbr"]);
			}
			import("@.Action.Home.IndexAction");
			$Index = new IndexAction();
			$Index->school = get_shcool_info(array("school_abbr" => strtolower(MODULE_NAME)));
			$Index->show();
		}
	}

//	public function _empty() {
//		if(strtolower(ACTION_NAME) == "tweets"){
//			$url = parse_url(__SELF__);
//			$tid = substr($url["path"],strrpos($url["path"],"/")+1);
//			if((int)$tid > 0 ){
//				import("@.Action.Home.TweetsAction");
//				$Tweets = new TweetsAction();
//				$Tweets->school = D("School")->where("school_abbr='" . strtolower(MODULE_NAME) . "'")->find();
//				$Tweets->tid = $tid;
//				$Tweets->index();
//			}
//		}else{
//			$this->error("没有找到路径");
//		}
//	}
}

?>
